﻿@using Janus.Mes.WebClient;
@using Janus.BaseEntitys;
@using Janus.Mes.VO;
@model CheckAddressVO
@{
    Layout = null;
    ViewBag.ViewTitle = "检验地点";
    if (ViewBag.IsCreate)
    {
        Model.IsEnable = true;
    }
}
<div class="pageContent">
    <form method="post" action="BaseData/CheckAddress/create?OpID=@ViewData["OperateID"]" class="pageForm required-validate"
          onsubmit="return validateCallback(this, dialogAjaxDone);">
        @Html.ValidationSummary(true)
        <div class="pageFormContent" layouth="56">
            <input id="hidIsCreate" name="hidIsCreate" type="hidden" value="@ViewBag.IsCreate" />
            @Html.HiddenFor(model => model.Id)
            <p>
                <label>
                    检验地点编码：
                </label>
                @if (ViewBag.IsCreate == true)
                {
                    @Html.TextBoxFor(sysConfig => sysConfig.AddrCode, new { @class = "required IsExisted", ajaxurl = "BaseData/CheckAddress/IsExist" })
                }
                else
                {
                    @Html.TextBoxFor(sysConfig => sysConfig.AddrCode, new { @Readonly = "true" })
                }
                @Html.ValidationMessageFor(sysConfig => sysConfig.AddrCode)
              
            </p>
            <p>
                <label>
                    检验地点名称：
                </label>
                @Html.TextBoxFor(c => c.AddrName, new { @class = "required" })
                @Html.ValidationMessageFor(c => c.AddrName)
            </p>
            <p>
                <label>
                    启用：
                </label>
                @Html.CheckBoxFor(sysConfig => sysConfig.IsEnable, new { @onclick = "return false" })
            </p>
            <p style="width:100%;height:50px">
                <label>
                    备注：
                </label>
                @Html.TextAreaFor(sysConfig => sysConfig.Remark, new { @style = "width:50%;height:30px" })
            </p>
            @Html.Partial("Operation", Model)
        </div>
        @Html.Partial("FormButtonBar")
    </form>
</div>